#include "CangLan.h"
#include "CangLan_tool.h"

/****************************** FORMATTER: formatter ******************************************/

//char formatter_variable_name0[] = "a1";
//char formatter_variable_name1[] = "a2";
//char formatter_variable_name2[] = "kp";
//char formatter_variable_name3[] = "ki";
//char formatter_variable_name4[] = "kd";
//char formatter_variable_name5[] = "t";

//char* formatter_variable_name_list[6]={
//	formatter_variable_name0,
//	formatter_variable_name1,
//	formatter_variable_name2,
//	formatter_variable_name3,
//	formatter_variable_name4,
//	formatter_variable_name5
//};

int a1, a2, t;
float kp, ki, kd;

u8 CangLan_formatter_format0[3] = {2,3,4};
u8 CangLan_formatter_format1[2] = {0,1};
u8 CangLan_formatter_format2[1] = {5};
u8 CangLan_formatter_format3[6] = {2,3,4,0,1,5};

CANGLAN_VARIABLE formatter_vpList[CANGLAN_FORMATTER_VARIABLE_NUM] = {{0,&a1},{0,&a2},{1,&kp},{1,&ki},{1,&kd},{0,&t}};

CANGLAN_FORMAT formatter_formatList[CANGLAN_FORMATTER_FORMAT_NUM] ={
	{3,CangLan_formatter_format0},
	{2,CangLan_formatter_format1},
	{1,CangLan_formatter_format2},
	{6,CangLan_formatter_format3}
};

CANGLAN_FORMATTER formatter={4,6,formatter_vpList,formatter_formatList};


